home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 7
/
Amoszine 7 (Disk 3 of 3).adf
/
ARCHIVES
/
AZ_Accessories_Library.lha
/
killcomments.amos
/
killcomments.amosSourceCode
Wrap
AMOS Source Code
|
1992-09-02
|
3KB
|
93 lines
' THE AMOSZINE CLASSIC ACCESSORIES LIBRARY
' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'
' ACCS NO. : 2
'
' PROC NAME: Remove Comments
'
' ORIGIN : Amos CD / Via Steve Bye
'
' AUTHOR : ??
'
' UPDATER : ANDY GIBSON
'
' PURPOSE : Remove ALL comments from source code listings
'
' COMMENT : It works only on the ' comment lines and not Rems !
'
' ===========================================================================
' ***
' *** To run this source you need Amos Pro !
' *** It can only be used by doing the following :
' *** Enter AMOS pull down menu and select LOAD ACCESSORY
' *** Load this file
' *** Now load up any Amos Source you have into the editor as normal
' *** Now if you want to get rid of all those comments, ya know the
' *** ones that start with ' just like this line does, then
' *** Enter AMOS pull down menu and select The new Accessory
' *** program (should be in red text under heading ACCESSORIES.
' *** It will run through your Amos Source and remove ALL comments
' *** that start with the ' char !
' ***
' *** It does NOT remove any REMS !!! Well blow me down ;-)
' ***
' *** I don't know who wrote this file and I don't really care as I
' *** don't think anyone will have a use for it, but ya never know !
' *** After all, comments should be left in your listing to remind
' *** you what a section of code does, but then again some people
' *** go over the top by commenting just about everything !
' *** (Ya should see the Az Engine source for a laugh !)
' ***
' *** If you have any better Accessories, send them in to myself and
' *** I'll include them on the next issue of Az.
' ***
' *** There must be some goodies out there that I haven't seen yet.
' ***
' *** Andy Gibson for AZ issue 7.
' ***
' *** PS - Sorry, but this file was not commented and as I've never
' *** delved into accessories, I can't be bothered to comment
' *** it :( It does work though as I've tested it - honest !
' ***
Set Accessory
NUMLINES=5
_STARTLINE=11
RTCURRLINE=1
_TOPTEXT=17
_ENDTEXT=18
RT=1
CONTROL_Y=23
MOVECURSORUP=1
Call Editor _TOPTEXT
Ask Editor NUMLINES
N=Param : If Param=0 Then End
For A=1 To N
Call Editor _STARTLINE
Ask Editor RTCURRLINE
A$=Param$
B=0
While B<>Len(A$) and Mid$(A$,B,1)<>Chr$(34)
Inc B
If Mid$(A$,B,1)="'"
Call Editor 30
Exit
End If
Call Editor 4
Wend
Call Editor 2
Next